<!DOCTYPE html>
<html lang="en">
<head>
    <title>新增帮助信息</title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="${base}/res/manage/css/common.css">
    <link href="${base}/res/manage/css/ec.css" rel="stylesheet">
    <link href="${base}/res/manage/css/list.css" rel="stylesheet">
    <link rel="stylesheet" href="${base}/res/manage/css/newInf.css">
    <script type="text/javascript" src="${base}/res/plugin/jquery/jquery-1.7.2.js"></script>
    <script type="text/javascript" src="${base}/res/plugin/validator/jquery.validate.min.js"></script>
    <script type="text/javascript" src="${base}/res/admin/js/common.js"></script>
    [#include "/admin/include/plupload.ftl" /]
    <script type="text/javascript">
        $(document).ready(function () {

            //图片上传
            var up = extPlupload("${base}", {});

            //表单验证，数据提交
            $("#inputForm").validate({
                rules: {
                    title: {
                        required: true,
                        maxlength: "50"
                    },
                    content:{
                        maxlength:"500"
                    },
                    orders:{
                        required:true
                    },
                    articleType:{
                        required:true
                    }
                },
                messages: {
                    title: {
                        required: "必填项",
                        maxlength: "最多50个字符"
                    },
                    content:{
                        maxlength:"最多500个字符"
                    },
                    orders:{
                        required:"必填项"
                    },
                    articleType:{
                        required:"必选项"
                    }
                }
        });
        });
    </script>
</head>
<body>
[#--主体--]
<div class="tab set">
    <h3><a href="list_2.jhtml">帮助信息</a><a href="${base}/admin/wxArticle/add_2.jhtml">> 添加帮助信息</a></h3>
    <div class="tablist message set">
        <form id="inputForm" name="inputForm" action="save_2.jhtml" method="post">
            <table cellpadding="0" cellspacing="0">
                <tr>
                    <td><label>文章标题<span class="cred"> * </span></label></td>
                    <td>
                        <input type="text" id="title" name="title"  placeholder="文章标题">
                    </td>

                    <td><label>文章分类<span class="cred"> * </span></label></td>
                    <td>
                        <select id="articleType" name="articleType">
                            <option value="">请选择</option>
                            [#list articleTypes as articleType]
                                <option value="${articleType.id}">
                                    [#if articleType.grade != 0]
                                        [#list 1..articleType.grade as i]
                                            &nbsp;&nbsp;
                                        [/#list]
                                    [/#if]
                                    ${articleType.name}
                                </option>
                            [/#list]
                        </select>
                        <a href="javascript:;" class="arrows">∨</a>
                    </td>
                </tr>
                <tr>
                    <td><label>是否置顶<span class="cred"> * </span></label></td>
                    <td>
                        <label><input type="radio" name="isTop" class="sex" value="0" checked>否</label>
                        <label><input type="radio" name="isTop" class="sex" value="1">是</label>
                    </td>
                    <td><label>是否发布<span class="cred"> * </span></label></td>
                    <td>
                        <label><input type="radio" name="isPublish" class="sex" value="0" checked>否</label>
                        <label><input type="radio" name="isPublish" class="sex" value="1">是</label>
                    </td>
                </tr>
                <tr>
                    <td><label>排序<span class="cred"> * </span></label></td>
                    <td>
                        <input type="text" id="orders" name="orders"  placeholder="排序">
                    </td>
                </tr>
                <tr>
                    <td><label>内容</label></td>
                    <td>
                        <textarea id="content" name="content" placeholder="请填写内容"></textarea>
                    </td>
                </tr>
            </table>
            <p class="save">
                <input type="submit" value="保存" class="red">
                <input type="button" value="取消" id="backButton" class="red">
            </p>
        </form>
    </div>
</div>
</body>
</html>